package com.hpeu_12.day1228;

public class MethodDemo02 {
	//定义一个方法，参数列表为可变参数
	public int add(int ... nums) {
		System.out.println("nums="+nums);
		return 0;
	}
	public static void main(String[] args) {
		MethodDemo02 methodDemo02 = new MethodDemo02();
		methodDemo02.add(1,2,3,4,5);
		int[] arr = {4,5,6,7,8};
		System.out.println("arr="+arr);
	}
}
